package top.yueyazhui.learn_shiro.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import top.yueyazhui.learn_shiro.service.HelloService;

/**
 * @Author yueyazhui
 * @Date 2023/2/18
 */
@RestController
public class HelloController {

    @Autowired
    HelloService helloService;

    @GetMapping({"","hello"})
    public String hello() {
        return helloService.hello();
    }

    @GetMapping("admin")
    public String admin() {
        return helloService.admin();
    }

    @GetMapping("unauthorized")
    public String unauthorized() {
        return "Hello Unauthorized";
    }
}
